<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>

<!-- datagrid数据表格 -->
<table id="adminmyDatagrid"></table>
<!-- datagrid数据表格==END== -->

<script type="text/javascript">
    $(function () {

        /* datagrid展示数据 */
        $("#adminmyDatagrid").datagrid({
            url: '${pageContext.request.contextPath}/admin/showAll',
            pagination: true,
            columns: [[
                {field: 'adminId', title: '管理员编号'},
                {field: 'adminUsername', title: '管理员名字'},
                {
                    field: 'cmfzRoles', title: '管理员角色', formatter: function (value, row, index) {
                        var result="";
                        $.each(value, function(){
                            var roleName=this["roleName"];
                            result+=(roleName+" ");
                        });
                        return result;
                }
                }
            ]],
        });
        /* datagrid展示数据  结束 */

    });

</script>